import java.util.Scanner;

public class Daffodil {
    public static int f(int n) {
        int a,b,c;
        a = n % 10;
        b = (n/10)%10;
        c = n/100;
        if(a*a*a + b*b*b +c*c*c == n) return 1;
        else return 0;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你需要判断的水仙花数：");
        int num = scanner.nextInt();
        if(f(num) == 1) System.out.println("该数为水仙花数！");
        else System.out.println("该数不是水仙花数！");
    }
}
